const indexPage = require('express').Router()

indexPage.get('/', (req, res) => {
	const data = {
		cardData: [
			{
				id: 0,
				icon: 'el-icon-user-solid',
				title: 'New Visits',
				count: '102400'
			},
			{
				id: 1,
				icon: 'el-icon-chat-dot-square',
				title: 'Messages',
				count: '81212'
			},
			{
				id: 2,
				icon: 'el-icon-camera-solid',
				title: 'Purchases',
				count: '9280'
			},
			{
				id: 3,
				icon: 'el-icon-shopping-cart-1',
				title: 'Shoppings',
				count: '13600'
			}
		],
		echartsData: {
			one: {
				xAxis: {
					type: 'category'
				},
				yAxis: {
					type: 'value'
				},
				series: [
					{
						name: 'expected',
						type: 'line',
						data: [40, 89, 76, 25, 80, 64, 59, 75],
					},
					{
						name: 'actual',
						type: 'line',
						data: [75, 89, 46, 65, 80, 64, 29, 55],
					}
				]
			}
		}
	}
	res.send(data)
})

module.exports = indexPage